/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sale.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

/**
 * 销售任务工作记录Entity
 * @author 卢经纬
 * @version 2018-06-30
 */
public class SaleRecord extends DataEntity<SaleRecord> {
	
	private static final long serialVersionUID = 1L;
	private String recordName;		// 名称
	private Date startTime;		// 开始时间
	private Date endTime;		// 结束时间
	private String workType;		// 工作类型
	private String contacts;		// 客户联系人
	private String reason;		// 沟通事由
	private String result;		// 沟通结果
	private SaleTask saleTask;		// 销售任务ID 父类
	
	public SaleRecord() {
		super();
	}

	public SaleRecord(String id){
		super(id);
	}

	public SaleRecord(SaleTask saleTask){
		this.saleTask = saleTask;
	}

	@ExcelField(title="名称", align=2, sort=7)
	public String getRecordName() {
		return recordName;
	}

	public void setRecordName(String recordName) {
		this.recordName = recordName;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@NotNull(message="开始时间不能为空")
	@ExcelField(title="开始时间", align=2, sort=8)
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@NotNull(message="结束时间不能为空")
	@ExcelField(title="结束时间", align=2, sort=9)
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@ExcelField(title="工作类型", align=2, sort=10)
	public String getWorkType() {
		return workType;
	}

	public void setWorkType(String workType) {
		this.workType = workType;
	}
	
	@ExcelField(title="客户联系人", align=2, sort=11)
	public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}
	
	@ExcelField(title="沟通事由", align=2, sort=12)
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}
	
	@ExcelField(title="沟通结果", align=2, sort=13)
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}
	
	public SaleTask getSaleTask() {
		return saleTask;
	}

	public void setSaleTask(SaleTask saleTask) {
		this.saleTask = saleTask;
	}
	
}